package baza;

import java.io.Serializable;

@SuppressWarnings("serial")
public class Objekti implements Serializable {

	public static final String DATABASE_TABLE = "objekti";
	public static final String  C_ID_OBJEKTI = "id";
	public static final String  C_ID_USTANOVA = "id_ustanove";
	public static final String  C_NAZIVI_OBJEKATA = "naziv";
	public static final String  C_ADRESE_OBJEKATA = "adresa";
	public static final String  C_OPIS_OBJEKATA = "opis";
	public static final String  C_KOORDINATA_X = "kx";
	public static final String  C_KOORDINATA_Y = "ky";
	public static final String sql = String.format("create table %s(%s INT, %s INT, " +
			"%s TEXT, %s VARCHAR, %s VARCHAR,%s REAL, %s REAL)",  DATABASE_TABLE, C_ID_OBJEKTI, C_ID_USTANOVA, C_NAZIVI_OBJEKATA,
			C_ADRESE_OBJEKATA, C_OPIS_OBJEKATA, C_KOORDINATA_X, C_KOORDINATA_Y);
	
	private int id, idUstanove;
	private String naziv, adresa, opis;
	private double kx, ky;
	
	public Objekti(int id, int id_ustanove, String naziv, String adresa, String opis
			, double kx, double ky ){ 
		this.id = id;
		this.idUstanove = id_ustanove;
		this.naziv = naziv;
		this.adresa = adresa;
		this.opis = opis;
		this.kx = kx;
		this.ky = ky;
	}
	
	public int getId(){
		return id;
	}
	public int getIdUstanove(){
		return idUstanove;
	}
	public String getNazivObjekata(){
		return naziv;
	}
	public String getAdresa(){
		return adresa;
	}
	public String getOpis(){
		return opis;
	}
	public double getKx(){
		return kx;
	}
	public double getKy(){
		return ky;
	}
}
